package com.bajiao.service.banner.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bajiao.entity.banner.Banner;
import com.bajiao.mapper.banner.BannerMapper;
import com.bajiao.service.banner.BannerService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 轮播图
 * @Author: FanJq
 * @Date:   2024-01-10
 * @Version: V1.0
 */
@Service
public class BannerServiceImpl extends ServiceImpl<BannerMapper, Banner> implements BannerService {

    /**
     * @Description
     * 轮播图列表
     * @date 2024/12/12 15:10
     * @author FanJq
     * @param
     * @return {@link List< Banner>}
    */
    @Override
    public List<Banner> getList() {
        List<Banner> bannerList = super.lambdaQuery()
                .select(Banner::getImage)
                .orderByAsc(Banner::getSort)
                .list();
        return bannerList;
    }
}
